package com.yugao.fintech.antelope.mps.core.parser;

import com.alibaba.fastjson2.JSON;
import com.yugao.fintech.antelope.infra.module.file.model.entity.MediaMaterial;
import com.yugao.fintech.antelope.mps.api.constatnts.ChannelTypeEnum;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class PcTemplateParser extends AbstractTemplateParser {
    /**
     * 媒体id
     *
     * @see MediaMaterial#getId()
     */
    private Long mediaId;

    @Override
    public ChannelTypeEnum channelType() {
        return ChannelTypeEnum.PC;
    }

    @Override
    protected AbstractTemplateParser jsonToObj(String jsonStr) {
        return JSON.parseObject(jsonStr, PcTemplateParser.class);
    }
}
